﻿namespace Luka;

/// <summary>
/// 缓存
/// 把方法中请求的数据缓存
/// </summary>
[NotScanned, AttributeUsage(AttributeTargets.Method | AttributeTargets.Class)]
public class CachingAttribute : Attribute
{
    /// <summary>
    /// 保存时间（分钟）
    /// </summary>
    public int Minute { get; set; } = 120;

    /// <summary>
    /// 构造函数
    /// </summary>
    public CachingAttribute()
    {
    }

    /// <summary>
    /// 构造函数
    /// </summary>
    public CachingAttribute(int minute = 120)
    {
        Minute = minute;
    }
}